<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::octree::OctreePointCloudVoxelCentroidContainer&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::octree::OctreePointCloudVoxelCentroidContainer&lt; PointT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><b>Octree</b> pointcloud voxel centroid leaf node class  
 <a href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="octree__pointcloud__voxelcentroid_8h_source.html">octree_pointcloud_voxelcentroid.h</a>&gt;</code></p>
<div class="dynheader">
类 pcl::octree::OctreePointCloudVoxelCentroidContainer&lt; PointT &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.png" usemap="#pcl::octree::OctreePointCloudVoxelCentroidContainer_3C_20PointT_20_3E_map" alt=""/>
  <map id="pcl::octree::OctreePointCloudVoxelCentroidContainer_3C_20PointT_20_3E_map" name="pcl::octree::OctreePointCloudVoxelCentroidContainer_3C_20PointT_20_3E_map">
<area href="classpcl_1_1octree_1_1_octree_container_base.html" title="Octree container class that can serve as a base to construct own leaf node container classes." alt="pcl::octree::OctreeContainerBase" shape="rect" coords="0,0,371,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0eacbed8daa2c7a3480aae611b8d90d1"><td class="memItemLeft" align="right" valign="top"><a id="a0eacbed8daa2c7a3480aae611b8d90d1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a0eacbed8daa2c7a3480aae611b8d90d1">OctreePointCloudVoxelCentroidContainer</a> ()</td></tr>
<tr class="memdesc:a0eacbed8daa2c7a3480aae611b8d90d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class initialization. <br /></td></tr>
<tr class="separator:a0eacbed8daa2c7a3480aae611b8d90d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae148b22dc20c8e7648e150918713356c"><td class="memItemLeft" align="right" valign="top"><a id="ae148b22dc20c8e7648e150918713356c"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#ae148b22dc20c8e7648e150918713356c">~OctreePointCloudVoxelCentroidContainer</a> ()</td></tr>
<tr class="memdesc:ae148b22dc20c8e7648e150918713356c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty class deconstructor. <br /></td></tr>
<tr class="separator:ae148b22dc20c8e7648e150918713356c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43eb07cc47a50223cec3318d076725c5"><td class="memItemLeft" align="right" valign="top"><a id="a43eb07cc47a50223cec3318d076725c5"></a>
virtual <a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html">OctreePointCloudVoxelCentroidContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a43eb07cc47a50223cec3318d076725c5">deepCopy</a> () const</td></tr>
<tr class="memdesc:a43eb07cc47a50223cec3318d076725c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">deep copy function <br /></td></tr>
<tr class="separator:a43eb07cc47a50223cec3318d076725c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a188c1337f76276ade56ef67f5ae9f631"><td class="memItemLeft" align="right" valign="top"><a id="a188c1337f76276ade56ef67f5ae9f631"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a188c1337f76276ade56ef67f5ae9f631">operator==</a> (const <a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html">OctreeContainerBase</a> &amp;) const</td></tr>
<tr class="memdesc:a188c1337f76276ade56ef67f5ae9f631"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equal comparison operator - set to false <br /></td></tr>
<tr class="separator:a188c1337f76276ade56ef67f5ae9f631"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a303a05d67bb1df4c5c8b0da6380b1927"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a303a05d67bb1df4c5c8b0da6380b1927">addPoint</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;new_point)</td></tr>
<tr class="memdesc:a303a05d67bb1df4c5c8b0da6380b1927"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add new point to voxel.  <a href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a303a05d67bb1df4c5c8b0da6380b1927">更多...</a><br /></td></tr>
<tr class="separator:a303a05d67bb1df4c5c8b0da6380b1927"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a308840b2828cd3e839f08bef6f3acbbd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a308840b2828cd3e839f08bef6f3acbbd">getCentroid</a> (<a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;centroid_arg) const</td></tr>
<tr class="memdesc:a308840b2828cd3e839f08bef6f3acbbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate centroid of voxel.  <a href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a308840b2828cd3e839f08bef6f3acbbd">更多...</a><br /></td></tr>
<tr class="separator:a308840b2828cd3e839f08bef6f3acbbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bfb3786985fe99945bb58133a519d72"><td class="memItemLeft" align="right" valign="top"><a id="a1bfb3786985fe99945bb58133a519d72"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html#a1bfb3786985fe99945bb58133a519d72">reset</a> ()</td></tr>
<tr class="memdesc:a1bfb3786985fe99945bb58133a519d72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset leaf container. <br /></td></tr>
<tr class="separator:a1bfb3786985fe99945bb58133a519d72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1octree_1_1_octree_container_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html">pcl::octree::OctreeContainerBase</a></td></tr>
<tr class="memitem:ad236a507a13d44bf50cd4d3b0dc509e2 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="ad236a507a13d44bf50cd4d3b0dc509e2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#ad236a507a13d44bf50cd4d3b0dc509e2">OctreeContainerBase</a> ()</td></tr>
<tr class="memdesc:ad236a507a13d44bf50cd4d3b0dc509e2 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor. <br /></td></tr>
<tr class="separator:ad236a507a13d44bf50cd4d3b0dc509e2 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4473805c7a5f6a6ac18df499f5f688c4 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="a4473805c7a5f6a6ac18df499f5f688c4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#a4473805c7a5f6a6ac18df499f5f688c4">OctreeContainerBase</a> (const <a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html">OctreeContainerBase</a> &amp;)</td></tr>
<tr class="memdesc:a4473805c7a5f6a6ac18df499f5f688c4 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor. <br /></td></tr>
<tr class="separator:a4473805c7a5f6a6ac18df499f5f688c4 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fa5bef348201c21e8f3394c56a8e172 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="a6fa5bef348201c21e8f3394c56a8e172"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#a6fa5bef348201c21e8f3394c56a8e172">~OctreeContainerBase</a> ()</td></tr>
<tr class="memdesc:a6fa5bef348201c21e8f3394c56a8e172 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty deconstructor. <br /></td></tr>
<tr class="separator:a6fa5bef348201c21e8f3394c56a8e172 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5610fa721dca963718afd2c24f12a58b inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#a5610fa721dca963718afd2c24f12a58b">operator!=</a> (const <a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html">OctreeContainerBase</a> &amp;other) const</td></tr>
<tr class="memdesc:a5610fa721dca963718afd2c24f12a58b inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inequal comparison operator  <a href="classpcl_1_1octree_1_1_octree_container_base.html#a5610fa721dca963718afd2c24f12a58b">更多...</a><br /></td></tr>
<tr class="separator:a5610fa721dca963718afd2c24f12a58b inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c692811ea0db0f397e69c13d227891d inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#a5c692811ea0db0f397e69c13d227891d">getSize</a> () const</td></tr>
<tr class="memdesc:a5c692811ea0db0f397e69c13d227891d inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pure abstract method to get size of container (number of indices)  <a href="classpcl_1_1octree_1_1_octree_container_base.html#a5c692811ea0db0f397e69c13d227891d">更多...</a><br /></td></tr>
<tr class="separator:a5c692811ea0db0f397e69c13d227891d inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9eead54d1484998b444287ad5c331fc inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="ae9eead54d1484998b444287ad5c331fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#ae9eead54d1484998b444287ad5c331fc">addPointIndex</a> (const int &amp;)</td></tr>
<tr class="memdesc:ae9eead54d1484998b444287ad5c331fc inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty addPointIndex implementation. This leaf node does not store any point indices. <br /></td></tr>
<tr class="separator:ae9eead54d1484998b444287ad5c331fc inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade17a4e9ba7a370724dbb1ab0829a823 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="ade17a4e9ba7a370724dbb1ab0829a823"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#ade17a4e9ba7a370724dbb1ab0829a823">getPointIndex</a> (int &amp;) const</td></tr>
<tr class="memdesc:ade17a4e9ba7a370724dbb1ab0829a823 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty getPointIndex implementation as this leaf node does not store any point indices. <br /></td></tr>
<tr class="separator:ade17a4e9ba7a370724dbb1ab0829a823 inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9255d01a092524c5f6235d726174273f inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memItemLeft" align="right" valign="top"><a id="a9255d01a092524c5f6235d726174273f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1octree_1_1_octree_container_base.html#a9255d01a092524c5f6235d726174273f">getPointIndices</a> (std::vector&lt; int &gt; &amp;) const</td></tr>
<tr class="memdesc:a9255d01a092524c5f6235d726174273f inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty getPointIndices implementation as this leaf node does not store any data. \ <br /></td></tr>
<tr class="separator:a9255d01a092524c5f6235d726174273f inherit pub_methods_classpcl_1_1octree_1_1_octree_container_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a4bf75c5565517dc62a274de75ffb855b"><td class="memItemLeft" align="right" valign="top"><a id="a4bf75c5565517dc62a274de75ffb855b"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>point_counter_</b></td></tr>
<tr class="separator:a4bf75c5565517dc62a274de75ffb855b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae283d6efc5e26a1e850cfe3e696cbe4c"><td class="memItemLeft" align="right" valign="top"><a id="ae283d6efc5e26a1e850cfe3e696cbe4c"></a>
<a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a>&#160;</td><td class="memItemRight" valign="bottom"><b>point_sum_</b></td></tr>
<tr class="separator:ae283d6efc5e26a1e850cfe3e696cbe4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::octree::OctreePointCloudVoxelCentroidContainer&lt; PointT &gt;</h3>

<p><b>Octree</b> pointcloud voxel centroid leaf node class </p>
<dl class="section note"><dt>注解</dt><dd>This class implements a leaf node that calculates the mean centroid of all points added this octree container. </dd></dl>
<dl class="section author"><dt>作者</dt><dd>Julius Kammerl (<a href="#" onclick="location.href='mai'+'lto:'+'jul'+'iu'+'s@k'+'am'+'mer'+'l.'+'de'; return false;">juliu<span style="display: none;">.nosp@m.</span>s@ka<span style="display: none;">.nosp@m.</span>mmerl<span style="display: none;">.nosp@m.</span>.de</a>) </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a303a05d67bb1df4c5c8b0da6380b1927"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a303a05d67bb1df4c5c8b0da6380b1927">&#9670;&nbsp;</a></span>addPoint()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html">pcl::octree::OctreePointCloudVoxelCentroidContainer</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::addPoint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>new_point</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Add new point to voxel. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">new_point</td><td>the new point to add <br  />
 </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        {</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;          <span class="keyword">using namespace </span>pcl::common;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;          ++point_counter_;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;          point_sum_ += new_point;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a308840b2828cd3e839f08bef6f3acbbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a308840b2828cd3e839f08bef6f3acbbd">&#9670;&nbsp;</a></span>getCentroid()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html">pcl::octree::OctreePointCloudVoxelCentroidContainer</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::getCentroid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>centroid_arg</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate centroid of voxel. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">centroid_arg</td><td>the resultant centroid of the voxel </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;          <span class="keyword">using namespace </span>pcl::common;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;          <span class="keywordflow">if</span> (point_counter_)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;          {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            centroid_arg = point_sum_;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;            centroid_arg /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span> (point_counter_);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;          }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;          <span class="keywordflow">else</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;          {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            centroid_arg *= 0.0f;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;          }</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>octree/include/pcl/octree/<a class="el" href="octree__pointcloud__voxelcentroid_8h_source.html">octree_pointcloud_voxelcentroid.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>octree</b></li><li class="navelem"><a class="el" href="classpcl_1_1octree_1_1_octree_point_cloud_voxel_centroid_container.html">OctreePointCloudVoxelCentroidContainer</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
